package com.wz.demo.api;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangze
 * @date 2018-03-02 13:50.
 **/
@RestController
@RequestMapping("/api/v1/test")
@Api(value = "用户controller", tags = {"用户操作接口"})
public class TestApiController {


    @RequestMapping(value = "index", method = RequestMethod.GET)
    @ApiOperation("返回hello world")
    public String hello(@RequestParam(name = "name", defaultValue = "") @ApiParam("用户名称") String name) {
        return "hello world " + name;
    }

}
